/*
 * @Description: 公司名称
 * @Author: iamsmiling
 * @Date: 2021-06-15 08:50:40
 * @LastEditTime: 2021-06-15 17:39:19
 */
import 'package:credit_business_circle/R/R.dart';
import 'package:credit_business_circle/components/textfield/clearable_text_field.dart';
import 'package:credit_business_circle/pages/mine/children/profile/company_edit/company_edit_controller.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';

class CompanyEditPage extends GetView<CompanyEditController> {
  const CompanyEditPage({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text("公司名称"),
      ),
      body: GetBuilder<CompanyEditController>(
        builder: (_) {
          return Column(
            children: [
              Visibility(
                visible: _.showTip,
                child: Stack(
                  children: [
                    Container(
                      padding: EdgeInsets.only(
                          top: R.dimen.dp16,
                          left: R.dimen.dp15,
                          bottom: R.dimen.dp15,
                          right: R.dimen.dp20),
                      alignment: Alignment.centerLeft,
                      width: R.dimen.width,
                      // height: R.dimen.dp60,
                      key: ValueKey("TipItem"),
                      decoration: BoxDecoration(color: R.color.ffd4faed),
                      child: Text(
                        "警告：请填写贵公司营业执照上的公司名，如发现填写虚假的公司或则冒用他人公司，将做封号处理，且纳入系统黑名单。",
                        style: TextStyle(
                            fontSize: R.dimen.sp11, color: R.color.ff111111),
                      ),
                    ),
                    Positioned(
                        top: R.dimen.dp10,
                        right: R.dimen.dp10,
                        child: GestureDetector(
                            onTap: _.close,
                            child: Image.asset(R.image.closeTip)))
                  ],
                ),
              ),
              Expanded(
                child: Container(
                  color: R.color.ffffffff,
                  margin: EdgeInsets.only(top: R.dimen.dp17),
                  padding: EdgeInsets.only(
                      left: R.dimen.dp16,
                      right: R.dimen.dp16,
                      top: R.dimen.dp8),
                  child: Column(
                    children: [
                      ClearableTextField(
                          initialValue: "",
                          style: TextStyle(
                              fontSize: R.dimen.sp16, color: R.color.ff222222),
                          decoration: InputDecoration(
                            border: UnderlineInputBorder(
                                borderSide: BorderSide(
                                    color: R.color.ffdddddd, width: .5)),
                            focusedBorder: UnderlineInputBorder(
                                borderSide: BorderSide(
                                    color: R.color.ffdddddd, width: .5)),
                            enabledBorder: UnderlineInputBorder(
                                borderSide: BorderSide(
                                    color: R.color.ffdddddd, width: .5)),
                            errorBorder: UnderlineInputBorder(
                                borderSide:
                                    BorderSide(color: R.color.ffdddddd)),
                          ),
                          suffixIcon: Image.asset(R.image.clean)),
                      ListView(
                        shrinkWrap: true,
                        children: [
                          Container(
                            child: Column(
                              children: [
                                Container(
                                  padding: EdgeInsets.symmetric(
                                      vertical: R.dimen.dp20),
                                  child: Row(
                                    children: [
                                      Container(
                                        margin: EdgeInsets.only(
                                            right: R.dimen.dp14),
                                        child: Image.asset(
                                          R.image.search,
                                          color: R.color.ffaaaaaa,
                                        ),
                                      ),
                                      Text(
                                        "瀚海信息技术有限公司",
                                        style: TextStyle(
                                            fontSize: R.dimen.sp14,
                                            color: R.color.ff333333),
                                      )
                                    ],
                                  ),
                                ),
                                Divider(
                                  color: R.color.ffdddddd,
                                  height: .5,
                                )
                              ],
                            ),
                          )
                        ],
                      )
                    ],
                  ),
                ),
              )
            ],
          );
        },
      ),
    );
  }
}
